package com.onemore.task.model;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.voovan.tools.log.Logger;

import com.alibaba.fastjson.JSONObject;
import com.onemore.task.JdbcGlobal;
import com.onemore.task.OneJdbc;

public class ModelJtsqd extends JdbcGlobal{

	public final static String jtsqd_field[] = new String[] {"DJBH","YDJH"};//"BYZD6",
	static public boolean isExist(String DJBH) throws SQLException
	{
		if(search("JTSQD", "DJBH='"+DJBH+"'")){
    		return true;
    	}
		return false;
	}
	public static String getYdjh(String DJBH) throws SQLException
	{
		String sql = "SELECT YDJH FROM JTSQD WHERE DJBH='"+DJBH+"'";
        Map<String, Object> map = null;
		Logger.debug(sql);
		map = getJdbcOperate().queryMap(sql);
		if(map!=null&& map.containsKey("YDJH")) {
			Object obj = map.get("YDJH");
			if(obj != null)
				return ((String)obj);
			else
				return null;
		}else {
			throw null;
		}
	}
}
